home *** CD-ROM | disk | FTP | other *** search
/ Acorn Risc Technologies StrongARM CD-ROM / Acorn Risc Technologies StrongARM CD-ROM.iso / ftp / documents / appnotes / 216_230 / 216c / Text
Encoding:
Text File  |  1993-08-02  |  8.8 KB  |  255 lines

  1. 7th August 1992
  2. -----------------------------------------------------------------------------
  3. Support Group Application Note 
  4. Number: 216
  5. Issue: 1 
  6. Author: Russell Scott
  7. -----------------------------------------------------------------------------
  8.  
  9. How to use MS-DOS EDLIN and DR DOS EDITOR under the PC Emulator
  10.  
  11. -----------------------------------------------------------------------------
  12. Applicable Hardware: All RISC OS based platforms
  13.  
  14. Related Application Notes: 215 - Configuring the correct PC keyboard driver
  15.  
  16.  
  17. -----------------------------------------------------------------------------
  18. Copyright (C) Acorn Computers Limited 1992
  19.  
  20. Every effort has been made to ensure that the information in this leaflet is 
  21. true and correct at the time of printing. However, the products described in
  22. this leaflet are subject to continuous development and improvements and
  23. Acorn Computers Limited reserves the right to change its specifications at
  24. any time. Acorn Computers Limited cannot accept liability for any loss or
  25. damage arising from the use of any information or particulars in this
  26. leaflet. ACORN, ECONET and ARCHIMEDES are trademarks of Acorn Computers
  27. Limited.
  28. -----------------------------------------------------------------------------
  29. Support Group
  30. Acorn Computers Limited
  31. Acorn House
  32. Vision Park
  33. Histon
  34. Cambridge       CB4 4AE
  35. -----------------------------------------------------------------------------
  36.  
  37.  
  38. This application note describes how to use the text editors EDLIN (MS-DOS)
  39. and EDITOR (DR DOS) under the PC Emulator. These utilities are often used
  40. under the emulator for the creation and editing of the CONFIG.SYS and
  41. AUTOEXEC.BAT files.
  42.  
  43.  
  44. Contents         
  45.  
  46.         Introduction
  47.  
  48.         A brief description of EDLIN and EDITOR
  49.  
  50.         The MS-DOS Text Editor EDLIN
  51.  
  52.         The DR DOS Text Editor EDITOR
  53.  
  54.         Adding lines to text files:
  55.  
  56.                 - ECHO command
  57.                 - COPY CON command
  58.  
  59.  
  60. Introduction
  61.  
  62. This application note describes how to use the text editors EDLIN (for
  63. MS-DOS) and EDITOR (for DR DOS) under the PC Emulator. It is applicable to
  64. the following versions of MS/DR DOS which have been supplied with various
  65. versions of the PC Emulator :
  66.  
  67.         MS-DOS  3.21, 3.30
  68.         DR DOS  3.41, 5.0
  69.  
  70.  
  71. A brief description of EDLIN and EDITOR
  72.  
  73. EDLIN and EDITOR are text editors.  They allow you to create text files and
  74. save them on your discs. They also help you to update existing files by
  75. deleting, changing, and inserting lines in files. EDLIN is the text editor
  76. supplied with MS-DOS. EDITOR is the text editor supplied with DR DOS. 
  77.  
  78. These text editors are an alternative to the DOS commands COPY CON and ECHO
  79. used for creating or adding lines to a text file. EDLIN and EDITOR offer
  80. more powerful facilities including the editing of existing files.
  81.  
  82. NOTE: For a more detailed description of these and other DOS utilities you
  83. should obtain a complete     MS-DOS or DR DOS guide from any good dealer.  
  84.  
  85.  
  86. The MS-DOS Text Editor EDLIN
  87.  
  88. EDLIN is the MS-DOS line editor that you can use to create text files and
  89. save them on your discs. EDLIN also allows you to update existing files by
  90. deleting, changing and inserting lines in files. 
  91.  
  92. EDLIN divides the text from files into lines, each line containing up to 253
  93. characters. It gives each line a number and always numbers the lines
  94. consecutively. When you insert lines of text in a file, the line numbers
  95. after the inserted text are automatically adjusted. Similarly, when you
  96. delete lines in a file, the line numbers following the deleted text are
  97. automatically renumbered.
  98.  
  99. To start EDLIN, type the following command:
  100.  
  101.         EDLIN [drive][path] filename  <RETURN>
  102.  
  103. where filename is the file you want to edit. If you are creating a new file, 
  104. filename should be the name of the file you want to create. You should also
  105. include the path if the file is not in or going to be in the current working
  106. directory e.g. if EDLIN is in the directory C:\DOS and you wish to edit
  107. C:\BOOT\BATCH.BAT then you must specify the path (in this case C:\BOOT) for
  108. EDLIN to find the file.
  109.  
  110. Once you have typed the command, EDLIN displays the following:
  111.  
  112.  
  113.         NEW FILE or End of input file
  114.         *_
  115.  
  116.  
  117. The EDLIN prompt is an asterisk (*).
  118.  
  119. Here is a brief summary of commands that are available (Note: This is not a
  120. complete list). 
  121.  
  122. [line] I                Insert lines of text    
  123.  
  124.         The I (Insert) command allows you to insert text immediately before
  125.         the specified line. If you are creating a new file, you must type
  126.         the I (insert)  command before you can insert a new line of text.
  127.         Text begins on line 1,  and the next line number appears
  128.         automatically each time you press  the RETURN key.
  129.         
  130. [line],[line],[line]C   Copies lines
  131.  
  132.         The C (copy) command copies a range of lines to a specified line
  133.         number. The first and second line options specify the range of lines
  134.         that you want to copy. The third line option specifies the line
  135.         before which EDLIN will place the copied lines.
  136.         
  137. [line],[line]D          Deletes lines
  138.  
  139.         The D (delete) command deletes a specified range of lines in a file.
  140.         If you  omit the first line option, EDLIN defaults to the current
  141.         line. If you omit the second line option, EDLIN deletes just the
  142.         first line.
  143.  
  144. [line]          Edits a line or lines
  145.  
  146.         The line option allows you to specify the line number of text you
  147.         want to  edit.           
  148.  
  149. E       Ends editing session and saves edited text
  150.  
  151. [line],[line]L          Lists a range of lines
  152.  
  153.         The L (list) command displays a range of lines, including the two
  154.         lines specified. To list lines 5 through 10 inclusive, type:  5,10L
  155.  
  156. Q               Quit editing session without saving the changes
  157.  
  158. CTRL C          Exit editing/insert mode to return you to the command prompt (*)        
  159.  
  160.  
  161.  
  162. The DR DOS text editor EDITOR
  163.  
  164. This section describes how to use EDITOR, a full-screen editor which you can
  165. use to create and edit text files. EDITOR allows you to scroll/edit a full
  166. page of text at a time.
  167.  
  168. To start EDITOR type the following command:
  169.  
  170.  
  171.         EDITOR  [drive][path] filename  <RETURN>
  172.  
  173. where filename is the name of the file to edit or to create. If EDITOR finds
  174. the file, it displays it on the screen. If EDITOR cannot find the file it
  175. displays the message:
  176.  
  177.         c:\myfile.txt ...file not found
  178.         
  179.         Create new file (Y/N)?
  180.  
  181. Type Y to create the file, or N to go to the EDITOR title screen where you
  182. can type in another filename, or press ESC to leave EDITOR.
  183.  
  184. To enter text, type as you would if using a word processor or typewriter
  185. except when you reach the end of a line, press RETURN to start a new one.
  186. This is because in EDITOR there is no "word wrap"; it does not automatically
  187. start a new line unless you tell it to.
  188.  
  189. Many of the quick keyboard shortcuts in EDITOR are similar to WordStar. You
  190. can get online help in EDITOR by pressing F1 or CTRL J. To exit from the
  191. help screen, press ESC.
  192.  
  193. You can save your file by pressing CTRL KX. This will save your work for you
  194. and then exit EDITOR. To exit without saving your work, press CTRL  KQ.
  195.  
  196. Other useful keys:
  197.  
  198.         CTRL QR         Goto start of file
  199.         CTRL QC         Goto end of file
  200.         CTRL QS         Goto start of line
  201.         CTRL QD         Goto end of line
  202.         CTRL Y          Delete current line
  203.         Cursor keys⇩⇨⇦  Use these to move around the file
  204.         Page Up         Move the page up fourteen lines
  205.         Page Down       Move the page down fourteen lines
  206.         Insert/ CTRL V  Switch between insert/overtype mode
  207.         CTRL KB         Mark start of a block of text
  208.         CTRL KK         Mark end of a block of text
  209.         CTRL KV         Move a marked block of text
  210.         CTRL KY         Delete a marked block of text
  211.         CTRL KC         Copy a marked block of text
  212.         
  213.  
  214.  
  215.  
  216. Adding lines to text files
  217.  
  218. You can quickly add lines to your CONFIG.SYS and AUTOEXEC.BAT files using
  219. the ECHO and COPY CON commands:
  220.  
  221. The ECHO command:
  222.  
  223.  
  224.         ECHO  [drive][path]command/filename  >>  [drive][path]filename
  225.  
  226. For example, to add the ANSI.SYS driver to the CONFIG.SYS file:
  227.  
  228.         ECHO  DEVICE = C:\DOS\ANSI.SYS  >>  C:\CONFIG.SYS
  229.  
  230. This will then append the above line to your CONFIG.SYS file in the root
  231. directory on the hard disc partition drive C. 
  232.  
  233. The COPY CON command:
  234.  
  235. This command tells MS-DOS to copy what you type from the keyboard console,
  236. into a specified file. For example:
  237.  
  238.         COPY CON C:\AUTOEXEC.BAT
  239.  
  240. will create a new file called AUTOEXEC.BAT into which you could type the
  241. following:
  242.  
  243.         PATH = C:\;C:\DOS
  244.         PROMPT $P$G
  245.  
  246. After the last line entered, press the F6 key to insert a CTRL Z (end of
  247. file marker), and then press ENTER to copy these lines into the AUTOEXEC.BAT
  248. file.
  249.  
  250.  
  251. Acknowledgements
  252.  
  253. DR DOS is a trademark of Digital Research Inc.
  254. MS DOS is a trademark of Microsoft Corporation.
  255.